package Ex241210;

public class Circle extends ShapeVirtual{
    private final double PI = 3.1415926;
    private double r;
    public Circle(double r){
        this.r = r;
    }
    public double calculateArea(){
        return PI * r * r;
    }
    public void cout_area(){
        System.out.print("半径为");
        System.out.print(r);
        System.out.print("的圆的面积为");
        System.out.println(calculateArea());
    }
}
